<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQTypesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('q_types', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->notNull()->default('')->comment('类型名称');
            $table->string('logo')->notNull()->default('')->comment('类型logo');
            $table->tinyInteger('status')->notNull()->default(0)->comment('状态 0：使用中 1：禁用');
            $table->integer('parent_id')->notNull()->default(0)->comment('父级ID');
            $table->integer('admin_id')->notNull()->default(0)->comment('创建者');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('q_types');
    }
}
